<?php /*a:3:{s:75:"F:\phpstudy\PHPTutorial\WWW\tp6cms\application\admin\view\content\edit.html";i:1557726283;s:74:"F:\phpstudy\PHPTutorial\WWW\tp6cms\application\admin\view\common\head.html";i:1557047321;s:74:"F:\phpstudy\PHPTutorial\WWW\tp6cms\application\admin\view\common\left.html";i:1557454321;}*/ ?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>ThinkPHP5.0</title>

    <meta name="description" content="Dashboard">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--Basic Styles-->
    <link href="/static/admin/style/bootstrap.css" rel="stylesheet">
    <link href="/static/admin/style/font-awesome.css" rel="stylesheet">
    <link href="/static/admin/style/weather-icons.css" rel="stylesheet">

    <!--Beyond styles-->
    <link id="beyond-link" href="/static/admin/style/beyond.css" rel="stylesheet" type="text/css">
    <link href="/static/admin/style/demo.css" rel="stylesheet">
    <link href="/static/admin/style/typicons.css" rel="stylesheet">
    <link href="/static/admin/style/animate.css" rel="stylesheet">
    <link rel="stylesheet" href="/static/admin/plus/layui/css/layui.css">
    <script src="/static/admin/plus/ueditor/ueditor.config.js"></script>
    <script src="/static/admin/plus/ueditor/ueditor.all.min.js"></script>
    <script src="/static/admin/plus/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
    
</head>

<body>
    <!-- 头部 -->
    <div class="navbar">
    <div class="navbar-inner">
        <div class="navbar-container">
            <!-- Navbar Barnd -->
            <div class="navbar-header pull-left">
                <a href="#" class="navbar-brand">
                    <small>
                        <img src="/static/admin/images/logo.png" alt="">
                    </small>
                </a>
            </div>
            <!-- /Navbar Barnd -->
            <!-- Sidebar Collapse -->
            <div class="sidebar-collapse" id="sidebar-collapse">
                <i class="collapse-icon fa fa-bars"></i>
            </div>
            <!-- /Sidebar Collapse -->
            <!-- Account Area and Settings -->
            <div class="navbar-header pull-right">
                <div class="navbar-account">
                    <ul class="account-area">
                        <li>
                            <a class="login-area dropdown-toggle" data-toggle="dropdown">
                                <div class="avatar" title="View your public profile">
                                    <img src="/static/admin/images/adam-jansen.jpg">
                                </div>
                                <section>
                                    <h2><span class="profile"><span>admin</span></span></h2>
                                </section>
                            </a>
                            <!--Login Area Dropdown-->
                            <ul class="pull-right dropdown-menu dropdown-arrow dropdown-login-area">
                                <li class="username"><a>David Stevenson</a></li>
                                <li class="dropdown-footer">
                                    <a href="/admin/user/logout.html">
                                        退出登录
                                    </a>
                                </li>
                                <li class="dropdown-footer">
                                    <a href="/admin/user/changePwd.html">
                                        修改密码
                                    </a>
                                </li>
                            </ul>
                            <!--/Login Area Dropdown-->
                        </li>
                        <!-- /Account Area -->
                        <!--Note: notice that setting div must start right after account area list.
                        no space must be between these elements-->
                        <!-- Settings -->
                    </ul>
                </div>
            </div>
            <!-- /Account Area and Settings -->
        </div>
    </div>
</div>

    <!-- /头部 -->

    <div class="main-container container-fluid">
        <div class="page-container">
            <!-- Page Sidebar -->
            <div class="page-sidebar" id="sidebar">
                <!-- Page Sidebar Header-->
                <div class="sidebar-header-wrapper">
                    <input class="searchinput" type="text">
                    <i class="searchicon fa fa-search"></i>
                    <div class="searchhelper">Search Reports, Charts, Emails or Notifications</div>
                </div>
                <!-- /Page Sidebar Header -->
                <!-- Sidebar Menu -->
                <ul class="nav sidebar-menu">
    <!--Dashboard-->
    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-cog"></i>
        <span class="menu-text">系统设置</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="<?php echo url('admin/config/index'); ?>">
                    <span class="menu-text">
                        配置管理 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-user"></i>
        <span class="menu-text">管理员</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="">
                    <span class="menu-text">
                        管理列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-folder"></i>
        <span class="menu-text">栏目管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="<?php echo url('admin/cate/index'); ?>">
                    <span class="menu-text">
                        栏目列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="<?php echo url('admin/cate/create'); ?>">
                    <span class="menu-text">
                        栏目添加 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-file-text"></i>
        <span class="menu-text">文档管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="<?php echo url('content/index'); ?>">
                    <span class="menu-text">
                        文章列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="<?php echo url('content/create'); ?>">
                    <span class="menu-text">
                        文章添加 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-maxcdn"></i>
        <span class="menu-text">模型管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="<?php echo url('models/create'); ?>">
                    <span class="menu-text">
                        添加模型 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="<?php echo url('models/index'); ?>">
                    <span class="menu-text">
                        模型列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-tasks"></i>
        <span class="menu-text">自定义字段管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="<?php echo url('fields/create'); ?>">
                    <span class="menu-text">
                        添加字段 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="<?php echo url('fields/index'); ?>">
                    <span class="menu-text">
                        字段列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li>
        <a href="#" class="menu-dropdown">
            <i class="menu-icon fa fa-users"></i>
            <span class="menu-text">会员管理</span>
            <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="/admin/document/index.html">
                    <span class="menu-text">
                        文章列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li  class="open" > <a href="#"
        class="menu-dropdown">
        <i class="menu-icon fa fa-lock"></i>
        <span class="menu-text">权限配置</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="">
                    <span class="menu-text">
                        规则管理 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="">
                    <span class="menu-text">
                        用户组管理 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li  > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa  fa-video-camera"></i>
        <span class="menu-text">广告管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="">
                    <span class="menu-text">
                        广告位管理 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="">
                    <span class="menu-text">
                        广告管理 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li>
        <a href="#" class="menu-dropdown">
            <i class="menu-icon fa fa-sitemap"></i>
            <span class="menu-text">数据库管理</span>
            <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="">
                    <span class="menu-text">
                        备份数据库 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li>
        <a href="#" class="menu-dropdown">
            <i class="menu-icon fa fa-dashboard "></i>
            <span class="menu-text">模板管理</span>
            <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="">
                    <span class="menu-text">
                        文章列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li class="open" > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-bug"></i>
        <span class="menu-text">采集管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="">
                    <span class="menu-text">
                        添加采集节点 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="">
                    <span class="menu-text">
                        采集节点列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>



</ul>
                <!-- /Sidebar Menu -->
            </div>
            <!-- /Page Sidebar -->
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                        <li class="active">

                            <i class="fa fa-home"></i>
                            <a href="<?php echo url('content/index'); ?>">
                                文档管理
                            </a>
                        </li>
                        <li>文档编辑</li>
                    </ul>
                </div>
                <!-- /Page Breadcrumb -->

                <!-- Page Body -->
                <div class="page-body">
                    <div class="col-lg-12 col-sm-12 col-xs-12">
                        <form class="form-horizontal" role="form" action="<?php echo url('admin/content/update',array('id'=>$art['id'])); ?>" method="post" enctype="multipart/form-data">
                            <div class="widget-body">
                                <div class="widget-main ">
                                    <div class="tabbable">
    
                                              
                                                <div class="form-group">
                                                    <label class="col-lg-2 control-label">所属栏目</label>
                                                    <div class="col-lg-2">
                                                        <select class="form-control" name="cid" data-bv-field="country" disabled="disabled">
                                                            <option value="0">顶级栏目</option>
                                                            <?php if(is_array($cate) || $cate instanceof \think\Collection || $cate instanceof \think\Paginator): $i = 0; $__LIST__ = $cate;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                                            <option <?php if($art['cid'] == $vo['id']): ?> selected="selected" <?php endif; ?> value="<?php echo htmlentities($vo['id']); ?>"><?php echo htmlentities($vo['catename']); ?></option>
                                                            <?php endforeach; endif; else: echo "" ;endif; ?>
                                                        </select>
                                                        <input type="hidden" name="cid" value="<?php echo htmlentities($art['cid']); ?>">
                                                        <input type="hidden" name="model_id" value="<?php echo htmlentities($art['model_id']); ?>">
                                                        <input type="hidden" name="aid" value="<?php echo htmlentities($art['id']); ?>">
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                                    <label for="username" class="col-sm-2 control-label no-padding-right">属性</label>
                                                    <div class="col-sm-6">
                                                        <div class="checkbox" style="float:left; padding-left:10px;">
                                                            <label>
                                                                <input name="flag[]" <?php if(in_array('头条',$art['flag'])) echo "checked='checked'";?> class="colored-blue" value="头条" type="checkbox">
                                                                <span class="text">头条</span>
                                                            </label>
                                                        </div>
                        
                                                        <div class="checkbox" style="float:left; padding-left:10px;">
                                                            <label>
                                                                <input name="flag[]" class="colored-blue" <?php if(in_array('推荐',$art['flag'])) echo "checked='checked'";?> value="推荐" type="checkbox">
                                                                <span class="text">推荐</span>
                                                            </label>
                                                        </div>
                        
                                                        <div class="checkbox" style="float:left; padding-left:10px;">
                                                            <label>
                                                                <input name="flag[]" class="colored-blue" <?php if(in_array('幻灯',$art['flag'])) echo "checked='checked'";?> value="幻灯" type="checkbox">
                                                                <span class="text">幻灯</span>
                                                            </label>
                                                        </div>
                        
                                                        <div class="checkbox" style="float:left; padding-left:10px;">
                                                            <label>
                                                                <input name="flag[]" class="colored-blue" <?php if(in_array('加粗',$art['flag'])) echo "checked='checked'";?> value="加粗" type="checkbox">
                                                                <span class="text">加粗</span>
                                                            </label>
                                                        </div>
                        
                                                        <div class="checkbox" style="float:left; padding-left:10px;">
                                                            <label>
                                                                <input name="flag[]" class="colored-blue" <?php if(in_array('图片',$art['flag'])) echo "checked='checked'";?> value="图片" type="checkbox">
                                                                <span class="text">图片</span>
                                                            </label>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="form-group has-feedback">
                                                    <label class="col-lg-2 control-label">标题</label>
                                                    <div class="col-lg-2">
                                                        <input type="text" class="form-control" value="<?php echo htmlentities($art['title']); ?>" name="title"
                                                            data-bv-field="jobTitle">
                                                    </div>
                                                </div>
                                                <div class="form-group has-feedback">
                                                    <label class="col-lg-2 control-label">副标题</label>
                                                    <div class="col-lg-2">
                                                        <input type="text" class="form-control" value="<?php echo htmlentities($art['shorttitle']); ?>" name="shorttitle"
                                                            data-bv-field="jobTitle"><i class="form-control-feedback"
                                                            data-bv-field="jobTitle" style="display: none;"></i>
                                                    </div>
                                                </div>
                                                <div class="form-group">

                                                    <label for="username"
                                                        class="col-sm-2 control-label no-padding-right">缩略图</label>
                                                    <div class="col-sm-2">
                                                        <button type="button" class="layui-btn" id="layimg"
                                                            style="background:#2dc3e8;">
                                                            <i class="layui-icon">&#xe67c;</i>上传图片
                                                        </button>
                                                        <input type="hidden" value="<?php echo htmlentities($art['litpic']); ?>" id="imgcate" name="litpic">
                                                        <?php if($art['litpic'] != ''): ?>
                                                        <div id="thumb_list" style="height:80px;">
                                                            <span>
                                                                <img src="/<?php echo htmlentities($art['litpic']); ?>" alt="" height="80">
                                                                <button type="button" style="margin-top:-60px;margin-left:-27px;" class="layui-btn layui-btn-danger layui-btn-mini delimg" onclick="delimg(this);" data="<?php echo htmlentities($art['litpic']); ?>">
                                                                <i class="layui-icon">&#xe640;</i></button></span>
                                                        </div>
                                                        <?php endif; ?>
                                                    </div>

                                                </div>
                                                <div class="form-group has-feedback">
                                                    <label class="col-lg-2 control-label">关键字</label>
                                                    <div class="col-lg-6">
                                                        <input type="text" class="form-control" value="<?php echo htmlentities($art['keywords']); ?>" name="keywords"
                                                            data-bv-field="jobTitle"><i class="form-control-feedback"
                                                            data-bv-field="jobTitle" style="display: none;"></i>
                                                    </div>
                                                </div>
                                                <div class="form-group has-feedback">
                                                    <label class="col-lg-2 control-label">描述</label>
                                                    <div class="col-lg-6">
                                                        <textarea class="form-control" rows="10" name="desc"><?php echo htmlentities($art['desc']); ?></textarea>
                                                    </div>
                                                </div>
                                                <div class="form-group has-feedback">
                                                    <label class="col-lg-2 control-label">点击次数</label>
                                                    <div class="col-lg-2">
                                                        <input type="text" class="form-control" value="<?php echo htmlentities($art['click']); ?>" name="click"
                                                            data-bv-field="jobTitle"><i class="form-control-feedback"
                                                            data-bv-field="jobTitle" style="display: none;"></i>
                                                    </div>
                                                </div>
                                                <div id="has"></div>
                                                <div class="form-group has-feedback">
                                                    <label class="col-lg-2 control-label">作者</label>
                                                    <div class="col-lg-2">
                                                        <input type="text" class="form-control" value="<?php echo htmlentities($art['writer']); ?>" name="writer"
                                                            data-bv-field="jobTitle"><i class="form-control-feedback"
                                                            data-bv-field="jobTitle" style="display: none;"></i>
                                                    </div>
                                                </div>

                                                <div class="form-group has-feedback">
                                                    <label class="col-lg-2 control-label">来源</label>
                                                    <div class="col-lg-2">
                                                        <input type="text" class="form-control" value="<?php echo htmlentities($art['source']); ?>" name="source"
                                                            data-bv-field="jobTitle"><i class="form-control-feedback"
                                                            data-bv-field="jobTitle" style="display: none;"></i>
                                                    </div>
                                                </div>
                                                <!-- 自定义字段 -->
                                                <?php foreach($fields as $k =>$v):?>
                                                <div class="form-group">
                                                    <label for="username"
                                                        class="col-sm-2 control-label no-padding-right"><?php echo $v['cname'];?></label>
                                                    <div class="col-sm-6">
                                                        <?php switch ($v['type']) {
                                                            case 1:
                                                            case 7:
                                                            case 8:
                                                            echo '<input type="text" class="form-control" value="'.$diyData[$v['ename']].'" name="'.$v['ename'].'"
                                                            data-bv-field="jobTitle">';
                                                            break;
                                                            case 2:
                                                            if($v['values']){
                                                                $arr=explode(',',$v['values']);
                                                                foreach($arr as $k1 =>$v1){
                                                                    if($diyData[$v['ename']]==$v1){
                                                                        $check='checked="checked"';
                                                                    }else{
                                                                        $check='';
                                                                    }
                                                                    echo '<label><input '.$check.' name="'.$v['ename'].'" value="'.$v1.'" class="colored-blue" type="radio"><span class="text">'.$v1.'</span></label>';
                                                                }

                                                            }
                                                             
                                                            break;
                                                            case 3:
                                                            if($v['values']){
                                                                $arr=explode(',',$v['values']);
                                                                $sect=explode(',', $diyData[$v['ename']]);
                                                                foreach($arr as $k2 =>$v2){
                                                                    if(in_array($v2,$sect)){
                                                                            $check='checked="checked"';
                                                                        }else{
                                                                            $check='';
                                                                        }
                                                                    
                                                                    echo '<label><input '.$check.'  name="'.$v['ename'].'[]" value="'.$v2.'" class="colored-blue" type="checkbox"><span class="text">'.$v2.'</span></label>';
                                                                }

                                                            }
                                                            break;
                                                            case 4:
                                                            if($v['values']){
                                                                echo  '<select class="form-control" name="'.$v['ename'].'" data-bv-field="country">';
                                                                $arr=explode(',',$v['values']);
                                                                foreach($arr as $k2 =>$v2){
                                                                    if($diyData[$v['ename']]==$v2){
                                                                        
                                                                        $select='selected="selected"';
                                                                    }else{
                                                                        $select='';
                                                                    }
                                                                    echo '<option '.$select.' value="'.$v2.'">'.$v2.'</option>';
                                                                }
                                                                echo '</select>';
                                                            }
                                                            break;
                                                            case 5:
                                                            echo '<textarea class="form-control" rows="10" name="'.$v['ename'].'">'.$diyData[$v['ename']].'</textarea>';
                                                            break;
                                                            case 6:
                                                            
                                                            echo '<input type="file" name="'.$v['ename'].'">';
                                                            if($diyData[$v['ename']]!=""){
                                                            echo '<span>';
                                                            echo  '<img src="/'.$diyData[$v['ename']].'" alt="" height="80">';
                                                            echo '<button type="button" style="margin-top:-60px;margin-left:-27px;" class="layui-btn layui-btn-danger layui-btn-mini delimg" onclick="delimg(this);" data="'.$diyData[$v['ename']].'">';
                                                                    echo    '<i class="layui-icon">&#xe640;</i>';
                                                                    echo   '</button>';
                                                            echo '</span>';}
                                                            break;
                                                            case 9:
                                                            echo '<div class="col-sm-6"><textarea name="'.$v['ename'].'" id="'.$v['ename'].'">'.$diyData[$v['ename']].'</textarea></div>';
                                                            echo '<script> var ue = UE.getEditor("'.$v['ename'].'", { initialFrameWidth: 1000, initialFrameHeight: 400 });</script>';
                                                            break;
                                                        }?>

                                                        
                                                        

                                                    </div>
                                                </div>
                                                <?php endforeach;?>
                                                <div class="form-group">
                                                    <label for="username"
                                                        class="col-sm-2 control-label no-padding-right">内容</label>
                                                    <div class="col-sm-6">
                                                        <textarea name="content" id="content"><?php echo htmlentities($art['content']); ?></textarea>
                                                    </div>
                                                </div>
                                           
                                        
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <button type="submit" class="btn btn-default">保存信息</button>
                                    </div>
                                </div>

                            </div>
                        </form>
                    </div>
                </div>

            </div>
            <!-- /Page Body -->
        </div>
        <!-- /Page Content -->
    </div>
    </div>

    <!--Basic Scripts-->
    <script src="/static/admin/style/jquery_002.js"></script>
    <script src="/static/admin/style/bootstrap.js"></script>
    <script src="/static/admin/style/jquery.js"></script>
    <!--Beyond Scripts-->
    <script src="/static/admin/style/beyond.js"></script>
    <script src="/static/admin/plus/layer/layer.js"></script>
    <script src="/static/admin/plus/layui/layui.js"></script>
    <script>
        var ue = UE.getEditor('content', { initialFrameWidth: 1000, initialFrameHeight: 400 });
        layui.use(['upload','form'], function () {
            var upload = layui.upload;
            var form = layui.form;
            //监听栏目
            // form.on('select(lanmu)', function(data){
            // console.log(data.elem); //得到select原始DOM对象
            // console.log(data.value); //得到被选中的值
            // console.log(data.othis); //得到美化后的DOM对象
            // });     
            //执行实例
            var uploadInst = upload.render({
                elem: '#layimg' //绑定元素
                 , accept: 'images' //允许上传的文件类型
                , field: "picfile"
                , size: 2048 //最大允许上传的文件大小
                , url: "<?php echo url('admin/common/uploadimg'); ?>" //上传接口
                , done: function (res) {
                //    console.log(res);return false;
                    setTimeout(function () {

                        if (res.code == 1) {
                            layer.msg(res.msg, { icon: 1 });
                            $('#imgcate').val(res.path);
                           
                            var str;
                            str = "<span>";
                            str = str + '<img src="/' + res.path + '" alt="" height="80">';
                            str = str + '<button type="button" style="margin-top:-60px;margin-left:-27px;" class="layui-btn layui-btn-danger layui-btn-mini delimg" onclick="delimg(this);" data="' + res.path + '">';
                            str = str + '<i class="layui-icon">&#xe640;</i>';
                            str = str + '</button>';
                            str = str + '</span>';
                            $('#thumb_list').html(str);
                            $('#thumb_list').show();
                        } else {
                            layer.msg(res.msg, { icon: 2 });
                        }
                        layer.closeAll('loading'); //关闭loading
                    }, 1000);
                }
                , error: function () {
                    //请求异常回调
                }
            });
        });
        function delimg(o){
            var url=$(o).attr('data');
            $.post("<?php echo url('common/delImg'); ?>",{'url':url},function(res){
                console.log(res)
                if(res.code==1||res.code==2){
                    $('input[name=pic]').val("");
                    //删除/移除缩略图
                   $(o).parent().remove();
                   $('#thumb_list').hide();
                   layer.msg(res.msg,{icon:1});
                }
                if(rse.code==0){
                    layer.msg(res.msg,{icon:2});
                }
            });
        }
     
    </script>


</body>

</html>